//Copyright 2010 Balazs Keri, Imre Keri
//
//This file is part of FireworksCreator.
//
//FireworksCreator is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//FireworksCreator is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with FireworksCreator.  If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _MODEL_PARTICLESHOOTER_H
#define _MODEL_PARTICLESHOOTER_H
//
#include <global.h>
#include "shooter.h"
#include "particletemplate_fwd.h"
//
namespace model
{
class ParticleShooter:public Shooter
{
   Q_OBJECT
   Q_DISABLE_COPY(ParticleShooter)
//construction
public:
   ParticleShooter(QObject *p_parent=0);
//data access
public:
   double get_time()const;
   void set_time(double p_time);
   const osg::Vec3 &get_position()const;
   void set_position(const osg::Vec3 &p_position);
   const osg::Vec3 &get_angle()const;
   void set_angle(const osg::Vec3 &p_angle);
   const osg::Vec3 &get_velocity()const;
   void set_velocity(const osg::Vec3 &p_velocity);
   const osg::Vec3 &get_angular_velocity()const;
   void set_angular_velocity(const osg::Vec3 &p_angular_velocity);
   ParticleTemplate *get_particle_template()const;
   void set_particle_template(ParticleTemplate *p_particle_template);
protected:
   double get_start_time_impl()const;
   void store_data_impl(QDataStream &p_stream)const;
   void restore_data_impl(RestoreStream &p_stream);
//data
private:
   double time;
   osg::Vec3 position;
   osg::Vec3 angle;
   osg::Vec3 velocity;
   osg::Vec3 angular_velocity;
   ParticleTemplate *particle_template;
};
}
//
#endif
